//    Copyright (C) Kherty.  All rights reserved.
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Text;

namespace OpenLS.Spreadsheet
{
    class ConditionalFormattingInformation
    {
        public IconSetInformation Icon;
        public DataBarInformation DataBar;
        public ColorScaleInformation ColorScale;
        public DifferentialStyleRecord DifferentialStyleRecord;
        public List<ConditionalFormatting> ConditionalFormattings;

        public bool IsDefault
        {
            get {
                return DataBar != null && ColorScale != null && DifferentialStyleRecord != null &&
                       ConditionalFormattings != null; }
        }

        public void Remove(ConditionalFormatting conditionalFormatting)
        {
            Contract.Requires(conditionalFormatting != null);
            this.ConditionalFormattings.Remove(conditionalFormatting);
            Contract.Assert(ConditionalFormattings.Count > 0);
        }
    }
}
